package String.StringBuilderDemo;

import java.util.Scanner;

public class StringBuilder对称字符串 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String str=sc.next();

        StringBuilder sb=new StringBuilder();
        String newStr=sb.append(str).reverse().toString();
        if(str.equals(newStr)){
            System.out.println("对称的字符串");
        }else{
            System.out.println("不对称的字符串");
        }
    }
}
